package com.example.project.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

import java.io.Serializable;

@Getter
public enum RoleEnum implements Serializable {
    ADMIN(1, "管理员"),
    CUSTOMER(2, "员工"),

    INFORMATION_CLERK(6, "资料员");
    @EnumValue // 入库
    private int roleId;
        @JsonValue //
    public String roleName;

    RoleEnum(int roleId, String roleName) {
        this.roleId = roleId;
        this.roleName = roleName;
    }

    public String getRoleName() {
        return roleName;
    }
}
